java.lang.ObjectHand
public class Hand
Hand models a hand of cards held by a player.
| Constructor Summary | |
|---|---|
Hand()
Constructs a new, empty hand. |
|
| Method Summary | |
|---|---|
void |
addCard(Card aCard)
Adds the specified card to this hand. |
boolean |
isEmpty()
Determines if this hand is empty. |
Card |
playCard()
Removes a card from this hand. |
int |
size()
Returns the number of cards that are currently in this hand. |
java.lang.String |
toString()
Returns a String that lists the ranks (but not the suits) of all the cards in this hand, starting with the first card and finishing with the last card. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Hand()
| Method Detail |
|---|
public void addCard(Card aCard)
a - specified card to be added;public boolean isEmpty()
public Card playCard()
public int size()
public java.lang.String toString()
toString in class java.lang.Object